home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ahoy 1986 July
/
Ahoy_Magazine_86-07_1986_Double_L.d64
/
c-64 dos
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
2KB
|
90 lines
1 print"[147]":poke53280,5:poke53281,0:poke646,7
2 print"*************************************"
3 print"* *"
4 print"* cadet's c-64 dos *"
5 print"* *"
6 print"*************************************":print
10 printtab(3);"a",tab(4)"access directory"
20 printtab(3);"b",tab(4)"backup files"
30 printtab(3);"c",tab(4)"consolidate files"
40 printtab(3);"d",tab(4)"delete files"
50 printtab(3);"e",tab(4)"error status"
60 printtab(3);"f",tab(4)"format disk"
70 printtab(3);"g",tab(4)"give file a new name"
80 printtab(3);"x",tab(4)"exit to basic":print
90 print"enter letter signifying your choice"
99 input"what is your request";x$
100 print"[147]"
110 if x$="a" then gosub 200
120 if x$="b" then gosub 300
130 if x$="c" then gosub 400
140 if x$="d" then gosub 500
150 if x$="e" then gosub 600
155 if x$="f" then gosub 700
160 if x$="g" then gosub 800
190 if x$="x" then gosub 1000
199 goto 1
200 rem access directory
252 open 1,8,0,"$"
253 get#1,a$,b$
254 get#1,a$,b$
255 get#1,a$,b$
258 c=0:if a$<>""then c=asc(a$)
260 if b$<>""then c=c+asc(b$)*256
262 print mid$(str$(c),2);tab(3);
264 get#1,b$:if st<>0 then 282
266 if b$<> chr$(34) then 264
268 get #1,b$:if b$<> chr$(34) then print tab(8);b$;:goto 268
270 get #1,b$:if b$=chr$(32) then 270
272 print tab(28);:c$=""
274 c$=c$+b$:get #1,b$:if b$<>"" then 274
276 print left$(c$,3)
280 if st=0 then254
282 print " blocks free "
284 close 1:print:print"hit a key to return to menu"
290 get x$:ifx$=""then 290
295 return
300 rem backup file
310 gosub 2000
320 open 15,8,15,"c:"+nf$+"="+sf$
330 close 15:return
400 rem validate disk
410 print "warning:open files will be deleted."
420 print"hit y to validate.":input"continue";q$
430 if q$<>"y" then return
440 open 1,8,15,"v0"
450 close 1:return
500 rem erase file
510 input "what files to delete";fi$
520 input"do you wish to continue";x$
530 if x$<>"y"then return
540 open 15,8,15,"s0:"+fi$
550 close 15:return
600 rem display error status
610 open 15,8,15
620 input#15,a$,b$,c$,d$
630 print "error status:[160][160]"b$:print:print "error number:[160][160]"a$
640 print:print"hit a key to return to menu"
650 get x$:if x$=""then 650
660 close 15:return
700 rem format disk
710 print "insert disk to format"
720 print "enter disk name":input disk$
730 print:print "enter extender name":input id$
740 print"put disk to be erased in drive.":print"press y to continue. ";
750 input"continue";q$:if q$<>"y" then return
760 open 15,8,15,"n0:"+disk$+","+id$
770 close 15:return
800 rem give file new name
810 gosub 2000
820 open 15,8,15,"r:"+nf$+"="+sf$
830 close 15:return
1000 rem return to basic
1010 print "to erase wedge from memory type new."
1020 print"to return to program type run"
1099 end
2000 rem input routine
2010 input"what source file";sf$
2020 print:input "what is new file name";nf$
2030 return